package com.ruoyi.mall.product.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.ruoyi.common.core.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;

/**
 * 属性分组对象 pms_attr_group
 *
 * @author zhangqishu
 * @date 2022-05-25
 */
@Data
@NoArgsConstructor
@ToString
@AllArgsConstructor
public class PmsAttrGroup implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 分组id
     */
//    @TableId
    private Long id;

    /**
     * 组名
     */
    @Excel(name = "组名")
    private String name;

    /**
     * 排序
     */
    @Excel(name = "排序")
    private Long sort;

    /**
     * 组图标
     */
    @Excel(name = "组图标")
    private String icon;

    /**
     * 所属分类id
     */
    @Excel(name = "所属分类id")
    private Long categoryId;

    /**
     * 所属分类名称
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @TableField(exist = false)
    private String categoryName;

    /**
     * 备注
     */
    @Excel(name = "备注")
    private String remark;

    /**
     * 检索条件
     *
     * @JsonInclude(JsonInclude.Include.NON_EMPTY) 如果为null的情况下就不显示
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @TableField(exist = false)
    private String key;

    /**
     * 级联选择器方便修改情况下回显数据
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @TableField(exist = false)
    private Long[] values;
}
